import request from '@/utils/httpRequest'

export function fetchList(query) {
  return request({
    url: request.adornUrl('/delivery/config/page'),
    method: 'get',
    params: query
  })
}

export function addObj(data) {
  return request({
    url: request.adornUrl('/delivery/withdrawconfig'),
    method: 'post',
    data
  })
}

export function getObj(id) {
  return request({
    url: request.adornUrl('/delivery/withdrawconfig/' + id),
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: request.adornUrl('/delivery/config/' + id),
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: request.adornUrl('/delivery/config'),
    method: 'put',
    data: obj
  })
}

export function getAll() {
  return request({
    url: request.adornUrl('/delivery/withdrawconfig/page'),
    method: 'get'
  })
}
